package com.moxiao.yfjh.module.order.controller.admin.blindTradeRefund.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import static com.moxiao.yfjh.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 相亲订单退款 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class BlindTradeRefundBaseVO {

    @Schema(description = "售后单号", requiredMode = Schema.RequiredMode.REQUIRED)
    private String no;

    /**
     * 0=已退款，1=申请中，2=已取消退款（拒绝退款），待补充
     */
    @Schema(description = "售后状态：0=已退款，1=申请中，2=已取消退款（拒绝退款），待补充", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Integer status;

    @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3044")
    private Long userId;

    @Schema(description = "活动编码", requiredMode = Schema.RequiredMode.REQUIRED)
    private String activeNo;

    @Schema(description = "活动名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
    private String activeName;

    @Schema(description = "申请原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "不好")
    @NotNull(message = "申请原因不能为空")
    private String applyReason;

    @Schema(description = "补充描述", example = "你猜")
    private String applyDescription;

    @Schema(description = "退款凭证图片")
    private String applyPicUrls;

    @Schema(description = "订单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "24165")
    @NotNull(message = "订单编号不能为空")
    private Long orderId;

    @Schema(description = "订单流水号", requiredMode = Schema.RequiredMode.REQUIRED)
    private String orderNo;

    @Schema(description = "审批时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime auditTime;

    @Schema(description = "审批人", example = "26110")
    private Long auditUserId;

    @Schema(description = "审批备注", example = "不对")
    private String auditReason;

    @Schema(description = "退款金额，单位：分", requiredMode = Schema.RequiredMode.REQUIRED, example = "12448")
    private BigDecimal refundPrice;

    @Schema(description = "支付退款编号", example = "13902")
    private Long payRefundId;

    @Schema(description = "退款时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime refundTime;

    @Schema(description = "售后类型", example = "2")
    private Byte type;

}
